package com.springboot.springbootjpa.repository;

import com.springboot.springbootjpa.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 泛型 对象，主键类型
 */
public interface StudentRepositiory extends JpaRepository<Student,Long> {

    Student getById(Long id);

    Student getByScore(Double score);

//    @Query("select s from student s where score > ?1")
//    List<Student> findInScore(Double score);

    /**
     * jpql查询
     *
     */
//    @Query("select s from student s")
//    List<Student> getStudentList();

}
